package com.lan.controller;

import com.lan.entity.sys.Menu;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class IndexController extends BaseController {

    /**
     * default index.
     *
     * */
    @GetMapping("index")
    public String index() {
        return "sys/index/simpleIndex";
    }

    @GetMapping("index/index")
    public String indexIndex() {
        return "sys/index/index";
    }

    /**
     * pear index.
     *
     * */
    @GetMapping("pearIndex")
    public String pearIndex() {
        return "sys/index/pearIndex";
    }

    /**
     * pear demo.
     *
     * */
    @GetMapping("pearDemo")
    public String pearDemo() {
        return "sys/index/pearDemo";
    }

    /**
     * Menu.
     *
     * */
    @ResponseBody
    @GetMapping("getMenu")
    public List<Menu> getMenu() {
        return getMenuList();
    }
}
